package com.example.communist_app_api.db.dao;

import com.example.communist_app_api.db.dto.OrganizationDTO;
import com.example.communist_app_api.db.pojoDto.Organization;
import com.example.communist_app_api.db.pojoDto.OrganizationalStructureDTO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface OrganizationDao {

    Integer getOrganizationIdByOrganizationName(String organizationName);

    Organization getOrganizationByOrganizationName(String organizationName);

    List<OrganizationDTO> getAllCommunist(String organizationName);

    List<OrganizationDTO> findOrganizationName(String organizationName);

    Organization getOrganizationByOrganizationId(Integer id);

    Organization getParentIdIsZero();

    Boolean createOrganization(Organization organization);

    List<OrganizationalStructureDTO> getOrganizationByVagueOrganizationName(String organizationName);

    List<OrganizationalStructureDTO> getParentIdIsZeroOrganization();

    List<OrganizationalStructureDTO> getParentIdOrganizationByParentId(Integer parentId);

    Boolean updateOrganization(Organization organization);

    void deleteOrganizationMessage(Integer organizationId);

    List<Integer> getOrganizationIdListByParentId(Integer organizationId);

    String getOrganizationLevelById(Integer id);
}
